﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace SystemModule
{
    public class THealth
    {
        public int HP;
        public int MP;
        public int MaxHP;

        public byte[] ToByte()
        {
            using (var memoryStream = new MemoryStream())
            {
                var backingStream = new BinaryWriter(memoryStream);
                backingStream.Write(HP);
                backingStream.Write(MP);
                backingStream.Write(MaxHP);
                var stream = backingStream.BaseStream as MemoryStream;
                return stream.ToArray();
            }
        }
    } 
}
